package com.bwie.user.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: UserController
 * @Description:
 * @Author: ZengFz
 * @Date: 2024/5/17 9:19:56
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;


    /**
     * 根据手机号查询用户信息
     * @param tel
     * @return
     */
    @PostMapping("/findUserByTel/{tel}")
    public Result<User> findUserByTel(@PathVariable String tel){
        return Result.success(userService.findUserByTel(tel));
    }

//    /**
//     * 用户注册
//     * @param user
//     * @return
//     */
//    @PostMapping("/register")
//    public Result register(@RequestBody User user){
//        userService.register(user);
//        return Result.success();
//    }

}
